export function download(data: string, filename: string) {
  const a = document.createElement("a");
  a.download = filename;
  const blob = new Blob([data], { type: "text/plain;charset=UTF-8" });
  const url = URL.createObjectURL(blob);
  const href = url;
  a.href = href;
  a.click();
  URL.revokeObjectURL(url);
}
